<template>
    <div class="index">
        <public-footer></public-footer>
<<<<<<< HEAD
        <div class="mainLogon">
            <div class='btns'>
                <van-button type="primary" @click="toGovLogon">监管机构注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary">商户注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary" >检测机构注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary">消费者注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary">管理员注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary" @click="toNorLogon">普通人员注册</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary" @click="toNotfonud">暂无数据</van-button>
            </div>
            <div class='btns'>
                <van-button type="primary" @click="toPerson">人员</van-button>
            </div>
             <div class='btns' style='margin-bottom: 50px;'>
                <van-button type="primary" @click="toGovIndex">监管机构主页</van-button>
            </div>
=======
        <div  v-if="fusertype == 9024">
            <van-grid :column-num="2">
                <van-grid-item>
                    <van-dropdown-menu active-color="#4fc08d">
                        <div>
                            <van-dropdown-item v-model="value1" :options="option1" @closed="value1Close"/>
                        </div>
                    </van-dropdown-menu>
                </van-grid-item>
                <van-grid-item>
                    <van-button type="primary">商户注册</van-button>
                </van-grid-item>
            </van-grid>
            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button type="primary" >检测机构注册</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button type="primary">消费者注册</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button type="primary">管理员注册</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button type="primary" @click="toNorLogon">普通人员注册</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button type="primary" @click="toNotfonud">暂无数据</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button type="primary" @click="toPerson">人员</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button type="primary" @click="toGovIndex">监管机构主页</van-button>
                </van-grid-item>
                <van-grid-item>
                </van-grid-item>
            </van-grid>
        </div>
        <div v-else>
            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" @click="toGovLogon">监管机构注册</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button class='btnWidth' type="primary">商户注册</van-button>
                </van-grid-item>
            </van-grid>
            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" >检测机构注册</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button class='btnWidth' type="primary">消费者注册</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button class='btnWidth' type="primary">管理员注册</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" @click="toNorLogon">普通人员注册</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" @click="toNotfonud">暂无数据</van-button>
                </van-grid-item>
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" @click="toPerson">人员</van-button>
                </van-grid-item>
            </van-grid>

            <van-grid :column-num="2">
                <van-grid-item>
                    <van-button class='btnWidth' type="primary" @click="toGovIndex">监管机构主页</van-button>
                </van-grid-item>
                <van-grid-item>
                </van-grid-item>
            </van-grid>
>>>>>>> zcm
        </div>
    </div>
</template>

<script>
import  publicFooter  from '@/components/publicFooter';

import { 
    Button
    ,NavBar
    ,Icon
    ,PullRefresh 
    ,List
    ,SwipeCell
    ,Collapse
    , CollapseItem
    ,Divider
    ,Panel
    ,DropdownMenu
    , DropdownItem
    ,Search
    ,Dialog
<<<<<<< HEAD
=======
    ,Grid
    ,GridItem

>>>>>>> zcm
    } from 'vant';
export default {
    name: 'index',
    components: {
        publicFooter,
<<<<<<< HEAD
=======
        [Grid.name]: Grid,
        [GridItem.name]: GridItem,
>>>>>>> zcm
        [NavBar.name]:NavBar,
        [Button.name]:Button,
        [Icon.name]:Icon,
        [PullRefresh.name]:PullRefresh,
        [List.name]:List,
        [SwipeCell.name]:SwipeCell,
        [Collapse.name]:Collapse,
        [CollapseItem.name]:CollapseItem,
        [Divider.name]:Divider,
        [Panel.name]:Panel,
        [DropdownMenu.name]:DropdownMenu,
        [DropdownItem.name]:DropdownItem,
        [Search.name]:Search,
        [Dialog.name]:Dialog,
    },
    data () {
        return {
<<<<<<< HEAD
        
=======
            fusertype:9024,
            value1:1,
            option1: [
                { text: '二维码页面', value: 0 },
                { text: '监管机构注册', value: 1 },
            ],
>>>>>>> zcm
        }
    },
    created() {
        console.log(process.env.NODE_ENV)
        //this.getDataInfo()
    },
    methods:{
<<<<<<< HEAD
=======
        value1Close(){
            if(this.value1 == 1){
                this.$router.push({path: '/govLogon'});
            }else{
                this.$router.push({path: '/qrcodeUrl'});
            }
        },
>>>>>>> zcm
       toGovLogon(){
            this.$router.push({path: '/govLogon'});
        },
        toNorLogon(){
            this.$router.push({path: '/normalLogon'});
        },
        toNotfonud(){
            this.$router.push({path: '/publicNotFound'});
        },
        toPerson(){
            this.$router.push({path: '/personnel'});
        },
        toGovIndex(){
            this.$router.push({path: '/govIndex'});
        }
    }
}
</script>
<style >
<<<<<<< HEAD
=======
.btnWidth{
    width:70%;
    margin:0 auto
}
>>>>>>> zcm
.van-tabbar{
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}
.mainLogon .btns{
    margin-top:40px;
}
.mainLogon .btns button{
    width: 40%;
}
.indexList{
    margin-bottom:50px
}
.leftBtn .van-dropdown-menu{
    background: #f7f8fa
}
.topBarRight{
    font-size: 24px;
}
.listTile{
    text-align: left
}
.listLabel{
    text-align: left
}
.addProduct{
    color: #1989fa;
    margin-right:10px
}
.proText{
    text-align: left
}
.proText{
    margin-bottom:6px
}
.contractTop{
    display:flex
}
.contractTopLeft{
    width:70%;
    text-align: left
}
.contractTopLeft div{
    padding:4px
}
.contractTopRight{
    width:30%;
    text-align: right
}
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after{
    border:none
}
.contractTopRight .van-popup--top{
    width: 30%;
    left: 70%;
    border-radius: 4px;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}
.contractList{
    border-radius: 4px;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    margin:6px;
}
.iconAndText{
    text-align: center;
    line-height: 30px;
    display: flex;
    justify-content:center;
    width: 80%;
    margin:0 auto;
    padding: 4px 0 4px 0
}
.borderBottom{
    border-bottom: 1px dashed #DCDFE6
}
.productConent{
}
.productTop{
    display: flex;
    justify-content:space-between;
    line-height: 30px
}
.productList{
    margin:16px 0 0 0
}
.contractBottom{
    display: flex;
    line-height: 40px;
    justify-content: space-between ;
    border-bottom: 1px dashed #DCDFE6;
}
.half{
    width: 50%;
    text-align: left
}
</style>
